Method for adaptive image region partition and morphologic processing

ABSTRACT

An adaptive dilation method receives an image and performs an adaptive background distance transform to create an adaptive background distance transform image. A threshold is applied to the adaptive background distance transform image to generate adaptive dilation image output. An adaptive erosion method receives an image and performs an adaptive foreground distance transform to create an adaptive foreground distance transform image. A threshold is applied to the adaptive foreground distance transform image to generate adaptive erosion image output.

CROSS REFERENCE TO RELATED APPLICATION

This is a divisional of U.S. application Ser. No. 10/767,530, filed Jan.26, 2004.

TECHNICAL FIELD

This invention relates to a method for adaptive image region partitionand morphologic processing.

BACKGROUND OF THE INVENTION

Given an image that consists of a plurality of component regions, itsimage can be partitioned into zones of influence (ZOI). In the ZOIimage, each pixel is associated with a component label. The component(foreground) pixels in the component regions are labeled by theircomponent labels. The non-component (background) pixels are labeled bythe labels of the component that is closest to the pixels.

ZOI is a powerful tool to integrate results of multiple images acquiredfrom different aspects of the same objects of interest. In one typicalapplication scenario, the component regions are detected from one imageor one detection mode. The component regions are used to form the ZOI.The ZOI is then used to condition the detection or perform measurementsof other images or other detection modes. One application example iscell analysis in high content screening, cancer diagnosis, prenataltesting, genetic testing, tissue-based pathology assays, etc. In thisapplication, cell nuclei are stained and imaged in one image for nuclearsegmentation. Whole cells or specific cell characteristics are stainedand acquired in another image for whole cell or specific cellcharacteristics segmentation. Since nuclei tend to be isolated from eachother and whole cells tend to overlap, it is advantageous to divide thecell regions guided by the nuclear segmentation. ZOI could be used forcell region separation.

The ZOI operation is related to skeletal influence zones which arederived from Voronoi skeletons or medial axes that transform a 2D objectinto 1D line representation (R. Ogniewicz and M. Ilg, “Voronoiskeletons: Theory and applications,” in IEEE Comp. Vision and PatternRec., June 1992, pp. 63-69; Ogniewicz, R. L. and Kubler. O: HierarchicVoronoi Skeletons, Pattern Recognition, nr. 28, pp. 343-359, 1995).Voronoi skeletons or medial axes are derived from the concept ofdistance transformation (A. Meijster, J. B. T. M. Roerdink, W. H.Hesselink, “A General Algorithm For Computing Distance Transforms InLinear Time”, 2000; Mihail N. Kolountzakis, Kiriakos N. Kutulakos, “FastComputation of the Euclidean Distance Map for Binary Images”,Information Processing Letters, 1992). The ZOI operation is also relatedto recursive morphology (Haralick, R. M., Shapiro, L. G., “Computer andRobot Vision”, Volume I, pp. 236-237, Addison-Wesley, 1992; Serra, J.“Image Analysis and Mathematical Morphology”, PP. 385-387, AcademicPress, 1982). The ZOI regions are constructed by recursive dilation andconditioning operations.

The distance transform can be computed sequentially by a two-passprocedure. The method is very fast. It requires O(N²) time for an N by Nimage. However, the skeletonization requires iterative thinning orsimilar techniques. The processing time of these methods is shapedependent and sometimes time consuming for complex shapes. The recursivemorphology operation is not efficient for a general purpose computer andis time consuming for complex shapes. It is desirable to have a fast andtime predictable method to partition regions into zones of influence.

The prior art ZOI method uses the same distance metric for allcomponents. This is useful only for simple applications where all Theprior art ZOI method uses the same distance metric for all components.This is useful only for simple applications where all components are notdifferentiated. This is often not the case in practical applications.For example, in cell analysis applications, different cell types couldbe contained in the same image. In this case, it is disadvantageous todetermine ZOI using the same distance metric across all cell types sincelarge and small cells will be divided equally. It is desirable to havean adaptive ZOI algorithm that could adaptively apply a distance metricdependent on the component characteristics. For example, differentdistance scales could be used for different cell types or the distancecould be scaled according to the size of the component.

The same limitation exists in morphological dilation or erosionoperations and their combinations, such as opening and closing. Theprior art morphological operations use the same structuring element forall pixels in an image. The structuring element cannot be adaptivelychanged according to a pixel's component region property. Therefore,when trying to fill holes of a component region, other regions may bemerged. Thus, the connectivity (homotopic relations) is destroyed. It isdesirable to have an adaptive morphological processing method thatadaptively adjusts the structuring element size and shape according tothe characteristics of the components.

OBJECTS AND ADVANTAGES

This invention provides a method for adaptive image region partition andmorphologic processing. The partition is computed sequentially by atwo-pass procedure similar to distance transformation. In addition tothe shortest distance, the method tracks, propagates, and updates thecomponent label where a pixel's shortest distance is derived. The methodis very fast and the processing time is predictable and is componentshape independent. It requires O(N²) time for an N by N image and isideal for a use in a general purpose CPU. It could adaptively apply adistance metric depending on component characteristics. It enablesadaptive morphological processing that allows adaptive adjustment of thestructuring element size and shape according to characteristics of thecomponents. Furthermore, the method enables adaptive integration ofmultiple channel information in cell analysis.

The primary objective of the invention is to perform fast image regionpartitioning. A secondary objective is to achieve processing speedmostly independent of component shape. Another objective of theinvention is to adaptively apply a distance metric dependent oncomponent characteristics. The fourth objective is to provide adaptivemorphologic processing that allows adaptive adjustment of thestructuring element size and shape according to the characteristics ofthe components. The fifth objective of the invention is to provideadaptive integration of multiple channel information in cell analysisfor improved image measurement accuracy. The sixth objective of theinvention is to reduce cost and increase availability by facilitatingreal time applications using general purpose CPUs.

SUMMARY OF THE INVENTION

A fast image region partition method receives a component labeled imageand performs a two pass Zone Of Influence (ZOI) creation method tocreate a Zone Of Influence (ZOI) image. The two pass ZOI creation methodperforms a first pass scan to create a first pass intermediate distanceimage and a shortest distance component label image. It then performs asecond pass scan using the first pass intermediate distance image andthe shortest distance component label image to create a backgrounddistance transform image and a updated shortest distance component labelimage. An adaptive image region partition method receives a componentlabeled image and performs an adaptive two pass ZOI creation method tocreate an adaptive ZOI image. The distance lengths of the two passadaptive ZOI creation method depend on their associated componentlabels.

An adaptive cell segmentation method receives a nuclei mask image and acell mask image. It performs adaptive nuclei region partition using thenuclei mask image to create adaptive nuclei mask ZOI. An adaptive cellregion separation method uses the cell masks and the adaptive nucleimask ZOI to generate adaptive cell separated regions.

An adaptive dilation method receives an image and performs an adaptivebackground distance transform to create an adaptive background distancetransform image. A threshold is applied to the adaptive backgrounddistance transform image to generate adaptive dilation image output. Anadaptive erosion method receives an image and performs an adaptiveforeground distance transform to create an adaptive foreground distancetransform image. A threshold is applied to the adaptive foregrounddistance transform image to generate adaptive erosion image output.

BRIEF DESCRIPTION OF THE DRAWINGS

The preferred embodiment and other aspects of the invention will becomeapparent from the following detailed description of the invention whenread in conjunction with the accompanying drawings, which are providedfor the purpose of describing embodiments of the invention and not forlimiting same, in which:

FIG. 1A shows a Euclidean disc;

FIG. 1B shows the Euclidean distance transformed image of 1A;

FIG. 1C shows the city block distance transformed image of 1A;

FIG. 1D shows the chessboard distance transformed image of 1A;

FIG. 2 shows the medial axis of a rectangle defined in terms ofbi-tangent circles;

FIG. 3 shows the processing flow for the fast zones of interest creationmethod;

FIG. 4 shows the processing flow for a cell segmentation method;

FIG. 5A shows an illustrative image containing 5 cells of differenttypes;

FIG. 5B shows the nuclei masks of 5A;

FIG. 5C shows the cell masks of 5A;

FIG. 5D shows the overlay of nuclei mask ZOI boundaries on the cellimage of 5A;

FIG. 5E shows the distance transform of the cell masks of 5C;

FIG. 5F shows the overlay of adaptive nuclei mask ZOI boundaries on thecell image of 5A;

FIG. 5G shows the cell region segmentation of 5A after removing thepixels along the adaptive nuclei mask ZOI boundaries.

DETAILED DESCRIPTION OF THE INVENTION

I. Distance Transform

Given an image I, the foreground distance transform assigns eachforeground pixel the shortest distance between the pixel and abackground pixel. Conversely, the background distance transform assignseach background pixel the shortest distance between the pixel and aforeground pixel.

The distance transform is computed sequentially by a two-pass method.The first (forward) pass scans in a left-right top-bottom raster scanorder. The second (backward) pass scans in a reverse right-leftbottom-top order. In the first pass for a foreground distance transform,the output U(x,y) at pixel position (x,y) is determined by the value ofinput image I and the values at previously computed positions of U by${U\left( {x,y} \right)} = \left\{ \begin{matrix}{{\min\limits_{{({i,j})} \in {N^{B}{({x,y})}}}\left\{ {{U\left( {i,j} \right)} + {l\left( {i,j} \right)}} \right\}};} & {\forall{{I\left( {x,y} \right)} \in {foreground}}} \\{0;} & {\forall{{I\left( {x,y} \right)} \in {background}}}\end{matrix} \right.$

In one embodiment, the boundary condition is handled by settingU(x,−1)=0 and U(−1,y)=0. N^(B)(x,y) is the backward neighbors of thepixel (x,y). The backward neighbor contains a selected set of adjacentneighbors that are already scanned in the first pass. l(i,j) is theneighbor position dependent distance length. When l(i,j)=1 for all (i,j) and N^(B)(x,y) is the upper half of the 4-connected neighbor, thus,N^(B)(x,y)={(x−1,y), (x,y−1)}, then the resulting distance is thewell-known 4-connected city block distance (L₁). When l(i,j)=1 for all(i, j) and N^(B)(x,y) is the upper half of the 8-connected neighbor,thus, N^(B)(x,y)={(x−1,y), (x−1,y−1), (x,y−1), (x+1,y−1)}, then theresulting distance is the well-known 8-connected chessboard distance(L_(∞)). For the 8-connected neighbor, when l(x−1,y)=1,l(x−1,y−1)=√{square root over (2)}, l(x,y−1)=1, and l(x+1,y−1)=√{squareroot over (2)}, the resulting distance is the well-known Euclideandistance (L₂).

The second (backward) pass creates the distance transform image D by${D\left( {x,y} \right)} = {\min\left\{ {{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left( {{D\left( {i,j} \right)} + {l\left( {i,j} \right)}} \right)},{U\left( {x,y} \right)}} \right\}}$

N^(F)(x,y) is the forward neighbors of the pixel (x,y). The forwardneighbor contains a selected set of adjacent neighbors that are alreadyscanned in the second pass. For 4-connected city block distance,N^(F)(x,y) is the lower half of the 4-connected neighbor. That is,N^(F)(x,y)={(x+1,y), (x,y+1)}. For 8-connected chessboard distance andEuclidean distance, N^(F)(x,y) is the lower half of the 8-connectedneighbor. That is, N^(F)(x,y)={(x+1,y), (x+1,y+1), (x,y+1), (x−1,y+1)}.

The images in FIG. 1A to FIG. 1D illustrate the three distancetransforms applied to a Euclidean disc. FIG. 1A shows the Euclideandisc; FIG. 1B shows the Euclidean distance transformed image of FIG. 1A;FIG. 1C shows the city block distance transformed image of FIG. 1A; FIG.1D shows the chessboard distance transformed image of FIG. 1A.

II. Medial Axis

Medial axis or skeleton is initially introduced for shape description.The following hypothetical scenario can help visualize a medial axis.Let the shape be a region of grass surrounded by bare soil.Simultaneously at all boundary points of the grass region light a firethat burns uniformly from the border of the grass region to itsinterior. Eventually the firs burning from one part of the border willmeet the fire burning from another part of the border. Since all thegrass will have been burned at the meeting place, the fire will quenchand be extinguished. The locus of points on the arc of fire extinctionis the medial axis of the region. Another way to think about the medialaxis is as the loci of centers of bi-tangent circles that fit entirelywithin the foreground region being considered. FIG. 2 illustrates thisconcept for a rectangular shape. The medial axis of a rectangle 200 isdefined in terms of bi-tangent circles in FIG. 2.

Each point on the medial axis has an associated value that isproportional to the time it took for the fire to reach the given pointfrom the time the grass fire was set. The medial axis with its medialaxis distance function is called the medial axis transform. It is aninformation preserving representation of shape. To see this, justconsider running the grass fire backward. With time running in reverse,set a grass fire on each point of the medial axis exactly at the timethe original grass fire is extinguished at that point. The boundary ofthe fire at time t=0 would be the boundary of the original given shape.

The medial axis can be produced in two main ways. The first is to usemorphological thinning that successively erodes away pixels from theboundary (while preserving the end points of line segments) until nomore thinning is possible, at which point what is left approximates themedial axis (skeleton). An alternative method is to first calculate thedistance transform of the image. The skeleton then lies along thesingularities (i.e. creases or curvature discontinuities) in thedistance transform image. The medial axis is often described as beingthe ‘locus of local maxima’ on the distance transform image. If thedistance transform image is displayed as a 3-D surface plot with thethird dimension representing the grayscale value, the medial axis can beimagined as the ridges on the 3-D surface.

III. Zones of Influence

The distance transform can be applied to the background of the image andthe skeleton or medial axis of the background could be defined. One typeof background skeleton is the zone of influence. To define the zones ofinfluence, begin with a representation of a set S as the union of itscomponents C₁, . . . , C_(N): $S = {\bigcup\limits_{n = 1}^{N}C_{n}}$

The zone of influence Z_(n) associated with component C_(n) is the setof all points that are closer to C_(n) than to any other components.That is,Z _(n) ={p|d(p,C _(n))<d(p,C _(m)),m≠n}where d(p,C) denotes the distance from the point p to the set C.

Given an image consisting of a plurality of component regions, itsbackground (non-component regions) can be partitioned into zones ofinfluence (ZOI). In the ZOI image, each pixel is associated with acomponent label. The foreground pixels in the component regions arelabeled by their component labels. The background pixels are labeled bythe labels of the component that is closest to the pixel. Note that thezones of influence could be defined even though the pixels in acomponent are not connected.

We now describe the fast image region partition (zones of influencecreation) method of this invention. The processing flow of the fastzones of interest creation method is shown in FIG. 3. As shown in FIG.3, the input image 300 is subject to component labeling 306 that assignsa unique label to each component; this results in the component labeledimage 302. The component labeled image 302 is used by the two pass ZOIcreation 308 method that uses a distance transformation-like two passmethod to create the ZOI image 304. The method is very fast. It requiresO(N²) time for an N by N image.

III.1 Component Labeling

In the case that the connectivity is required for each component, thestandard connected component labeling method could be used to generatethe component labeled image. As mentioned previously, pixels in acomponent do not have to be connected. Those skilled in the art shouldrecognize that other labeling methods such as manual labeling,semi-automatic labeling, image segmentation and clustering could beused.

III.2 Two Pass ZOI Creation

Given a component labeled image L, the two pass ZOI creation methodsequentially computes the ZOI image by a two-pass method. Similar to thedistance transformation method, the first (forward) pass scans in aleft-right top-bottom raster scan order. The second (backward) passscans in a reverse right-left bottom-top order. In the first pass, anoutput first pass intermediate distance image value F(x,y) and ashortest distance component label image Z(x,y) at pixel position (x,y)are determined by the value of component labeled image L and thepreviously computed F and Z values by the following algorithm:$\quad{{F\left( {x,y} \right)} = \left\{ {{\begin{matrix}{{{{\min\limits_{{({i,j})} \in {N^{B}{({x,y})}}}{F\left( {i,j} \right)}} + {l\left( {i,j} \right)}};};} & {\forall{{L\left( {x,y} \right)} \in {background}}} \\{0;} & {\forall{{L\left( {x,y} \right)} \in {foreground}}}\end{matrix}{Z\left( {x,y} \right)}} = \left\{ \begin{matrix}{{Z\left( {\arg\quad{\min\limits_{{({i,j})} \in {N^{B}{({x,y})}}}\left\{ {{F\left( {i,j} \right)} + {l\left( {i,j} \right)}} \right\}}} \right)};} & {\forall{{L\left( {x,y} \right)} \in {background}}} \\{{L\left( {x,y} \right)};} & {\forall{{L\left( {x,y} \right)} \in {foreground}}}\end{matrix} \right.} \right.}$

The first pass intermediate distance image F stores the first passintermediate distance values and the shortest distance component labelimage Z(x,y) stores the label of the component that has the shortestintermediate distance to pixel (x,y).

In one embodiment, we handle the boundary condition by setting F(x,−1)=0and F(−1,y)=0. Those skilled in the art should recognize that othermethods of boundary condition handling could be used and they are allwithin the scope of this invention.

The second pass produces the background distance transform image D andupdates the shortest distance component label image, Z(x,y), by$\quad{{D\left( {x,y} \right)} = {\min\left\{ {{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left( {{D\left( {i,j} \right)} + {l\left( {i,j} \right)}} \right)},{F\left( {x,y} \right)}} \right\}}}$${Z\left( {x,y} \right)} = \left\{ \begin{matrix}{{Z\left( {\arg\quad{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left\{ {{D\left( {i,j} \right)} + {l\left( {i,j} \right)}} \right\}}} \right)};} & {{{If}\quad{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left\{ {{D\left( {i,j} \right)} + {l\left( {i,j} \right)}} \right\}}} < {F\left( {x,y} \right)}} \\{{Z\left( {x,y} \right)};} & {Otherwise}\end{matrix} \right.$

The updated Z(x,y) of the second pass stores the label of the componentthat has the shortest distance to pixel (x,y). Therefore, the final Z isthe resulting ZOI image. The length function l(i,j) and the forward andbackward neighbors, N^(F)(x,y) and N^(B)(x,y), of a pixel (x,y) can beselected so that the distance metric used for the ZOI could be cityblock distance (L₁), chessboard distance (L_(∞)), Euclidean distance(L₂), or other distance metrics.

Those skilled in the art will recognize that the scanning directions ofthe first pass and the second pass could be reversed. Furthermore, othercomplementary scanning directions could be used and they are all withinthe scope of this invention. For example, the first pass could bescanned in a right-left top-bottom scan and the second pass could bescanned in a left-right bottom-top scan order. Other configurations ofthe forward and backward neighbors can also be used.

IV. Adaptive Image Region Partition

The prior art zone of influence method assumes that a fixed distancemetric is used throughout the ZOI determination. This treats eachcomponent equally and represents a major limitation in practice. Forexample, in cell analysis applications, different cell types could becontained in the same image. In this case, it is disadvantageous todetermine ZOI using the same distance metric across all cell types sincelarge and small cells will be divided equally. It is desirable to havean adaptive ZOI algorithm that could adaptively apply a distance metricdepending on component characteristics. For example, different distancescales could be used for different cell types or the distance could bescaled according to the size of the component.

The adaptive image region partition method of this invention isaccomplished by making the length function l(i,j) dependent on componentlabels. The first pass of the adaptive two pass ZOI creation methodoutputs a first pass intermediate adaptive distance image F_(A) and anadaptive shortest distance component label image Z_(A) by the followingalgorithm ${F_{A}\left( {x,y} \right)} = \left\{ {{\begin{matrix}{{\min\limits_{{({i,j})} \in {N^{B}{({x,y})}}}\left\{ {{F_{A}\left( {i,j} \right)} + {l\left\lbrack {\left( {i,j} \right),{Z_{A}\left( {i,j} \right)}} \right\rbrack}} \right\}};} & {\forall{{L\left( {x,y} \right)} \in {background}}} \\{0;} & {\forall{{L\left( {x,y} \right)} \in {foreground}}}\end{matrix}{Z_{A}\left( {x,y} \right)}} = \left\{ \begin{matrix}{{Z_{A}\left( {\arg\quad{\min\limits_{{({i,j})} \in {N^{B}{({x,y})}}}\left\{ {{F_{A}\left( {i,j} \right)} + {l\left\lbrack {\left( {i,j} \right),{Z_{A}\left( {i,j} \right)}} \right\rbrack}} \right\}}} \right)};} & {\forall{{L\left( {x,y} \right)} \in {background}}} \\{{L\left( {x,y} \right)};} & {\forall{{L\left( {x,y} \right)} \in {foreground}}}\end{matrix} \right.} \right.$

The second pass produces the adaptive distance transform image D_(A) andupdates the adaptive shortest distance component label image,Z_(A)(x,y), by$\quad{{D_{A}\left( {x,y} \right)} = {\min\left\{ {{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left( {{D_{A}\left( {i,j} \right)} + {l\left\lbrack {\left( {i,j} \right),{Z_{A}\left( {i,j} \right)}} \right\rbrack}} \right)},{F_{A}\left( {x,y} \right)}} \right\}}}$${Z_{A}\left( {x,y} \right)} = \left\{ \begin{matrix}{{Z_{A}\left( {\arg\quad{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left\{ {{D_{A}\left( {i,j} \right)} + {l\left\lbrack {\left( {i,j} \right),{Z_{A}\left( {i,j} \right)}} \right\rbrack}} \right\}}} \right)};} & {{{If}\quad{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left\{ {{D_{A}\left( {i,j} \right)} + {l\left\lbrack {\left( {i,j} \right),{Z_{A}\left( {i,j} \right)}} \right\rbrack}} \right\}}} < {F_{A}\left( {x,y} \right)}} \\{{Z_{A}\left( {x,y} \right)};} & {Otherwise}\end{matrix} \right.$

Note that the length l[(i,j),Z_(A)(i,j)] is a function of theneighboring position (i,j) as well as the neighbor's associatedcomponent labels, Z_(A)(i,j). When the forward and backward neighbors,N^(F)(x,y) and N^(B)(x,y), are defined as a super set of all desirableneighbors, a desirable distance metric for a component label l could beconstructed by providing appropriate length values among the neighborpoints. If the super set neighbor includes unnecessary positions, theycan be effective disabled by the assignment of large length values forthe positions.

Those skilled in the art will recognize that the scanning directions ofthe first pass and the second pass could be reversed. Furthermore, othercomplementary scanning directions could be used and they are all withinthe scope of this invention. For example, the first pass could bescanned in a right-left top-bottom scan and the second pass could bescanned in a left-right bottom-top scan order. Other configurations ofthe forward and backward neighbors can also be used.

In one embodiment of the invention, a component specific weightingfactor, W(c), is applied to the original length function for adaptiveimage region partition. That is,l[(i,j),Z(i,j)]=l(i,j)*w(Z(i,j))

Where w(c) could be related to the size of the component or otherfactors such as the confidence or the types of the components.

Those skilled in the art should recognize that the length function couldbe any linear or nonlinear functions of the component labels. They areall within the scope of this invention.

The image region partition method can be used for cell analysis. FIG. 4shows the processing flow of a cell segmentation method. As shown inFIG. 4, the input nuclei mask image 400 is processed by the nucleiregion partition 408 method to create nuclei mask ZOI 404. The nucleiregion partition 408 can be performed using the fast zones of interestcreation method. The cell mask image 402 and the nuclei mask ZOI 404 areused by a cell region separation 410 step to create cell separatedregions 406 output.

The cell region separation 410 step considers the cell mask having thesame component label in the nuclei mask ZOI 404 as one cell region. Thisresults in the cell separated regions 406 output.

FIG. 5A to FIG. 5D illustrates an example of cell segmentation method.FIG. 5A shows an illustration of an image with 5 cells of differenttypes. The component image contains nuclei masks and the whole cellimage contains cell masks as illustrated in FIG. 5B and FIG. 5C.

FIG. 5D illustrates the overlay of the nuclei mask ZOI using staticEuclidean distance. The cell mask can be separated by the nuclei maskZOI as shown in FIG. 5D. Note that the static distance cuts the cell inthe middle of two nuclei, which incorrectly partitions part of cytoplasmof the large cells into smaller cells.

The adaptive image region partition method could be applied to improveperformance. An adaptive cell segmentation method inputs a nuclei maskimage and a cell mask image. It performs adaptive nuclei regionpartition using the nuclei masks to create adaptive nuclei mask ZOI. Itthen performs adaptive cell region separation using the cell masks andthe adaptive nuclei mask ZOI to generate adaptive cell separated regionsoutput.

The adaptive nuclei region partition method uses cell size estimate forthe weighting factor of the length function. FIG. 5E shows the distancetransform of the cell masks. In one embodiment of the invention, thecell size estimate is performed by averaging the cell distance valueswithin a nucleus. Let the cell size estimate for nucleus i be Si. In oneembodiment of the invention, the median value of Si among all nuclei inthe image is determined as S′. A weighting factor could be determinedfor each component as w(i)=Min (a, Max(b, S′/Si)) Where a>b. a and b aredetermined by the expected size difference between cells in the sameimage. In one embodiment of the invention, the values are set to a=2.0and b=0.5. FIG. 5F shows the overlay of the adaptive nuclei mask ZOIboundaries on the cell image. An enhancement could be performed byexcluding the pixels close to the adaptive nuclei mask ZOI boundaries.This further removes incorrect cytoplasm pixels to allow accuratecytoplasm measurements. FIG. 5G shows the results of this exclusion.

V. Adaptive Morphological Processing

The morphological dilation and erosion operations can be accomplished bydistance transform followed by thresholding. Dilation can beaccomplished by applying a distance transform on the image backgroundand then applying the thresholding. The thresholding operation selectedthe pixels whose values are less than or equal to the threshold value inthe resulting mask. Erosion can be accomplished by applying a distancetransform on the image foreground and then applying the thresholding. Inthis method, the distance metric determines the structuring elementshape and the threshold value determines the size of the structuringelement.

The prior art morphological dilation, erosion operations and theircombinations such as opening and closing use a common structuringelement for all pixels in an image. The structuring element cannot beadaptively changed according to a pixel's component region property.Therefore, when trying to fill the holes of a component region, otherregions may be merged and therefore, the connectivity (homotopicrelations) destroyed.

As described in section IV, the adaptive image region partition of thisinvention generates not only the Zone of influence image Z but also theadaptive background distance transform image D_(A). Applying thresholdto the adaptive background distance transform image results in theadaptive dilation image output.

Adaptive erosion can be accomplished by performing adaptive foregrounddistance transform to create an adaptive foreground distance transformimage. This is followed by applying a threshold on the adaptiveforeground distance transform image to create the adaptive erosion imageoutput.

In one embodiment of the invention, the adaptive foreground distancetransform is accomplished using a two-pass procedure. Similar to thestandard distance transformation method, the first (forward) pass scansin a left-right top-bottom raster scan order. The second (backward) passscans in a reverse right-left bottom-top order. In the first pass, theoutput image values F(x,y) at pixel position (x,y) is determined by thevalue of component labeled image L and the values at previously computedpositions of F by the following algorithm:${F\left( {x,y} \right)} = \left\{ \begin{matrix}{{\min\limits_{{({i,j})} \in {N^{B}{({x,y})}}}\left\{ {{F\left( {i,j} \right)} + {l\left\lbrack {\left( {i,j} \right),{L\left( {i,j} \right)}} \right\rbrack}} \right\}};} & {\forall{{L\left( {x,y} \right)} \in {foreground}}} \\{0;} & {\forall{{L\left( {x,y} \right)} \in {background}}}\end{matrix} \right.$

The second pass produces the adaptive foreground distance transformimage D_(F)(x,y), by${D_{F}\left( {x,y} \right)} = {\min\left\{ {{\min\limits_{{({i,j})} \in {N^{F}{({x,y})}}}\left( {{D_{F}\left( {i,j} \right)} + {l\left\lbrack {\left( {i,j} \right),{L\left( {i,j} \right)}} \right\rbrack}} \right)},{F\left( {x,y} \right)}} \right\}}$

Note that the length l[(i,j),Z(i,j)] is a function of the neighboringposition (i,j) as well as the component labels, L(i,j). When the forwardand backward neighbors, N^(F)(x,y) and N^(B)(x,y), are defined as asuper set of all desirable neighbors, a desirable distance metric for acomponent label l could be constructed by providing appropriate lengthvalues among the neighbor points. If the super set neighbor includesunnecessary positions, they can be effective disabled by the assignmentof large length values on these positions.

Those skilled in the art will recognize that the scanning directions ofthe first pass and the second pass could be reversed. Furthermore, othercomplementary scanning directions could be used and they are all withinthe scope of this invention. For example, the first pass could bescanned in a right-left top-bottom scan and the second pass could bescanned in a left-right bottom-top scan order. Other configurations ofthe forward and backward neighbors can also be used.

The invention has been described herein in considerable detail in orderto comply with the Patent Statutes and to provide those skilled in theart with the information needed to apply the novel principles and toconstruct and use such specialized components as are required. However,it is to be understood that the inventions can be carried out byspecifically different equipment and devices, and that variousmodifications, both as to the equipment details and operatingprocedures, can be accomplished without departing from the scope of theinvention itself.

1. An adaptive dilation method comprises the steps of: a) Input animage; b) Perform an adaptive background distance transform using theinput image to create an adaptive background distance transform image;c) Perform a threshold on the adaptive background distance transformimage to generate adaptive dilation image output.
 2. The adaptivedilation method of claim 15 wherein the adaptive background distancetransform uses a two pass method.
 3. An adaptive erosion methodcomprises the steps of: a) Input an image; b) Perform an adaptiveforeground distance transform using the input image to create anadaptive foreground distance transform image; c) Perform a threshold onthe adaptive foreground distance transform image to generate adaptiveerosion image output.
 4. The adaptive erosion method of claim 17 whereinthe adaptive foreground distance transform uses a two pass method.